package com.witdata.common.mapper;

import com.witdata.common.domain.dto.CodeDto;
import com.witdata.common.domain.dto.EnvironmentDto;
import com.witdata.mysql.domain.entity.TEnvironment;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface EnvironmentMapper {

    EnvironmentMapper INSTANCE = Mappers.getMapper(EnvironmentMapper.class);

    @Mapping(target = "containerEnv", ignore = true)
    EnvironmentDto toEnvironmentDto(TEnvironment tEnvironment);

    @Mapping(target = "containerEnv", ignore = true)
    TEnvironment toTEnvironment(EnvironmentDto environmentDto);

    List<EnvironmentDto> toEnvironmentDtoList(List<TEnvironment> tEnvironment);
}
